package com.simple.datax.db.mybatis.model;

import java.io.Serializable;
import java.util.Date;

import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 
 * @author paladin
 * 
 */
public class DataxNodeChannel implements Serializable {
	private String node;

	private String communSendType;

	private String communSendParam;

	private String communRecvType;

	private String communRecvParam;

	private Short flag;

	private Date time;

	private String msgFormat;

	private String msgCharset;

	private String msgType;

	private String nodeDesc;

	private static final long serialVersionUID = 1L;

	public String getNode() {
		return node;
	}

	public void setNode(String node) {
		this.node = node == null ? null : node.trim();
	}

	public String getCommunSendType() {
		return communSendType;
	}

	public void setCommunSendType(String communSendType) {
		this.communSendType = communSendType == null ? null : communSendType
				.trim();
	}

	public String getCommunSendParam() {
		return communSendParam;
	}

	public void setCommunSendParam(String communSendParam) {
		this.communSendParam = communSendParam == null ? null : communSendParam
				.trim();
	}

	public String getCommunRecvType() {
		return communRecvType;
	}

	public void setCommunRecvType(String communRecvType) {
		this.communRecvType = communRecvType == null ? null : communRecvType
				.trim();
	}

	public String getCommunRecvParam() {
		return communRecvParam;
	}

	public void setCommunRecvParam(String communRecvParam) {
		this.communRecvParam = communRecvParam == null ? null : communRecvParam
				.trim();
	}

	public Short getFlag() {
		return flag;
	}

	public void setFlag(Short flag) {
		this.flag = flag;
	}

	public Date getTime() {
		return time;
	}

	public void setTime(Date time) {
		this.time = time;
	}

	public String getMsgFormat() {
		return msgFormat;
	}

	public void setMsgFormat(String msgFormat) {
		this.msgFormat = msgFormat == null ? null : msgFormat.trim();
	}

	public String getMsgCharset() {
		return msgCharset;
	}

	public void setMsgCharset(String msgCharset) {
		this.msgCharset = msgCharset == null ? null : msgCharset.trim();
	}

	public String getMsgType() {
		return msgType;
	}

	public void setMsgType(String msgType) {
		this.msgType = msgType == null ? null : msgType.trim();
	}

	public String getNodeDesc() {
		return nodeDesc;
	}

	public void setNodeDesc(String nodeDesc) {
		this.nodeDesc = nodeDesc == null ? null : nodeDesc.trim();
	}

	@Override
	public boolean equals(Object that) {
		if (this == that) {
			return true;
		}
		if (that == null) {
			return false;
		}
		if (getClass() != that.getClass()) {
			return false;
		}
		DataxNodeChannel other = (DataxNodeChannel) that;
		return (this.getNode() == null ? other.getNode() == null : this
				.getNode().equals(other.getNode()))
				&& (this.getCommunSendType() == null ? other
						.getCommunSendType() == null : this.getCommunSendType()
						.equals(other.getCommunSendType()))
				&& (this.getCommunSendParam() == null ? other
						.getCommunSendParam() == null : this
						.getCommunSendParam()
						.equals(other.getCommunSendParam()))
				&& (this.getCommunRecvType() == null ? other
						.getCommunRecvType() == null : this.getCommunRecvType()
						.equals(other.getCommunRecvType()))
				&& (this.getCommunRecvParam() == null ? other
						.getCommunRecvParam() == null : this
						.getCommunRecvParam()
						.equals(other.getCommunRecvParam()))
				&& (this.getFlag() == null ? other.getFlag() == null : this
						.getFlag().equals(other.getFlag()))
				&& (this.getTime() == null ? other.getTime() == null : this
						.getTime().equals(other.getTime()))
				&& (this.getMsgFormat() == null ? other.getMsgFormat() == null
						: this.getMsgFormat().equals(other.getMsgFormat()))
				&& (this.getMsgCharset() == null ? other.getMsgCharset() == null
						: this.getMsgCharset().equals(other.getMsgCharset()))
				&& (this.getMsgType() == null ? other.getMsgType() == null
						: this.getMsgType().equals(other.getMsgType()))
				&& (this.getNodeDesc() == null ? other.getNodeDesc() == null
						: this.getNodeDesc().equals(other.getNodeDesc()));
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((getNode() == null) ? 0 : getNode().hashCode());
		result = prime
				* result
				+ ((getCommunSendType() == null) ? 0 : getCommunSendType()
						.hashCode());
		result = prime
				* result
				+ ((getCommunSendParam() == null) ? 0 : getCommunSendParam()
						.hashCode());
		result = prime
				* result
				+ ((getCommunRecvType() == null) ? 0 : getCommunRecvType()
						.hashCode());
		result = prime
				* result
				+ ((getCommunRecvParam() == null) ? 0 : getCommunRecvParam()
						.hashCode());
		result = prime * result
				+ ((getFlag() == null) ? 0 : getFlag().hashCode());
		result = prime * result
				+ ((getTime() == null) ? 0 : getTime().hashCode());
		result = prime * result
				+ ((getMsgFormat() == null) ? 0 : getMsgFormat().hashCode());
		result = prime * result
				+ ((getMsgCharset() == null) ? 0 : getMsgCharset().hashCode());
		result = prime * result
				+ ((getMsgType() == null) ? 0 : getMsgType().hashCode());
		result = prime * result
				+ ((getNodeDesc() == null) ? 0 : getNodeDesc().hashCode());
		return result;
	}
    
    public String toString() {
		return ReflectionToStringBuilder.toString(this,
				ToStringStyle.SHORT_PREFIX_STYLE);
	}
}